package org.example;

import org.myrule.MyRibbonRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

@SpringBootApplication //自动配置
@EnableEurekaClient //标识eureka客户端
//开启自定义负载均衡，name：对指定服务提供方进行负载均衡，configuration：指定负载均衡策略
@RibbonClient(name = "cloud-payment-service",configuration = MyRibbonRule.class)
public class OrderApplication {//启动类
    //主方法启动
    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class,args);
    }

}
